﻿@{
    ViewBag.Title = "变动记录";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section scripts{
    <script src="~/Areas/Dev/ViewModels/Dev.com.js"></script>
    <script src="~/Areas/Dev/ViewModels/Dev.viewModel.edit.js"></script>
    <script type="text/javascript">
            using(['numberbox', 'lookup']);
            var  viewModel =function(data){
                Dev.viewModel.edit.apply(this, arguments);//继承Senv.viewModel.edit
            };

            var viewModel = function(){
                var self = this;
                Dev.viewModel.edit.apply(self,arguments);
                this.grid.size={w:6,h:151};
                this.saveClick = function () {
                    //保存主表及明细表
                    var bmmc=$("#Bdjl_Jbry").combobox('getText');
                    self.form["Bdjl_Jbry"]=bmmc;
                    this.saveClick_One();
                };
            };

            var data = @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model));
            ko.bindingViewModel(new viewModel(data));
    </script>
}
<style type="text/css">
    .z-area-txt
    {
        margin: 0px;
        padding: 0 3px;
        width: 124px;
        line-height: 20px;
        height: 60px;
        border: 1px solid #A4BED4;
        background: white;
        font-size: 12px;
        display: inline-block;
    }
</style>
<div class="z-toolbar">
    <a id="a_save" href="#" plain="true" class="easyui-linkbutton" icon="icon-save" data-bind="click:saveClick,linkbuttonDisable:readonly" title="保存">保存</a> 
    <a id="a_undo" href="#" plain="true" class="easyui-linkbutton" icon="icon-undo" data-bind="click:rejectClick,linkbuttonDisable:readonly" title="撤消"> 撤消</a> 
    <a id="a_audit" href="#" plain="true" class="easyui-linkbutton" icon="icon-user-accept" data-bind="click:auditClick,easyuiLinkbutton:approveButton" title="审核">审核</a>
    <a id="a_printer" href="#" plain="true" class="easyui-linkbutton" icon="icon-printer" title="打印" data-bind="click:printClick">打印</a>
    <div class="datagrid-btn-separator"></div>
</div>
<div id="master" class="container_12" data-bind="inputwidth:1">

    <div class="grid_12 lbl" style="text-align: center; font-size: x-large; color: Black;
        font-family: 黑体; margin-top: 20px; margin-bottom: 20px">
        变动记录明细</div>
    <div class="clear" ></div>

    <div class="grid_1 lbl ">变动编号</div>
    <div class="grid_3 val"><input type="text" data-bind="value:form.Bdjl_BillNo,readOnly:true" class="z-txt " /></div>
    <div class="grid_1 lbl ">变动日期</div>
    <div class="grid_3 val"><input type="text" data-bind="dateboxValue:form.Bdjl_Ywrq,readOnly:readonly" class="z-txt easyui-datebox" /></div>
    <div class="grid_1 lbl ">变动设备</div>
    <div class="grid_3 val"> 
    <input type="text" data-bind="lookupValue:form.Bdjl_Sbbh,lookupReadOnly:readonly"
          class="easyui-combobox z-txt easyui-lookup" required="true" data-options="lookupType:'sbda',parentField:'pid'" />
     </div>
    <div class="clear" ></div>

    <div class="grid_1 lbl ">原部门</div>
    <div class="grid_3 val">
         <input type="text" data-bind="lookupValue:form.Bdjl_Ybmbh,lookupReadOnly:readonly"
          class="easyui-combobox z-txt easyui-lookup" required="true" data-options="lookupType:'organize',parentField:'pid'" />
     </div>
    <div class="grid_1 lbl ">经办部门</div>
    <div class="grid_3 val">
        <input type="text" data-bind="lookupValue:form.Bdjl_Bmbh,lookupReadOnly:readonly"
        class="easyui-combobox z-txt easyui-lookup" required="true" data-options="lookupType:'organize',parentField:'pid'" />
    </div>
    <div class="grid_1 lbl ">经办人</div>
    <div class="grid_3 val">
        <input type="text" id="Bdjl_Jbry" data-bind="lookupValue:form.Bdjl_Jbry,lookupReadOnly:readonly"  required="true"  class="z-txt easyui-lookup" data-options="lookupType:'sysuser',multiple:true" />
    </div>
    <div class="clear" ></div>

    <div class="grid_1 lbl">变动原因</div>
    <div class="grid_11 val">
        <textarea data-bind="value:form.Bdjl_Bdyy,readOnly:readonly" style="width: 99%" class="z-area-txt"> </textarea></div>
    <div class="clear" ></div>

    <div class="grid_1 lbl ">数量</div>
    <div class="grid_3 val"><input type="text" data-bind="numberboxValue:form.Bdjl_Sl,readOnly:readonly" class="z-txt easyui-numberbox" /></div>
    <div class="grid_1 lbl ">设备主管</div>
    <div class="grid_3 val"><input type="text" data-bind="value:form.Bdjl_Sbzg,readOnly:readonly" class="z-txt " /></div>
    <div class="grid_1 lbl ">数据来源</div>
    <div class="grid_3 val"><input type="text" data-bind="value:form.Bdjl_Sjly,readOnly:readonly" class="z-txt " /></div>
    <div class="clear" ></div>
   
    <div class="grid_1 lbl ">创建人</div>
    <div class="grid_3 val"><input type="text" data-bind="value:form.CreatePerson,readOnly:true" class="z-txt " /></div>
    <div class="grid_1 lbl ">创建日期</div>
    <div class="grid_3 val"><input type="text" data-bind="dateboxValue:form.UpdateDate,readOnly:readonly" class="z-txt easyui-datebox " disabled="disabled" /></div>
    <div class="grid_1 lbl ">更新人</div>
    <div class="grid_3 val"><input type="text" data-bind="value:form.UpdatePerson,readOnly:true" class="z-txt " /></div>
    <div class="clear" ></div>
   
   
    <div class="grid_1 lbl ">更新日期</div>
    <div class="grid_3 val"><input type="text" data-bind="dateboxValue:form.UpdateDate,readOnly:readonly" class="z-txt easyui-datebox" disabled="disabled" /></div>
    <div class="grid_1 lbl ">审核人</div>
    <div class="grid_3 val"><input type="text" data-bind="value:form.ApprovePerson,readOnly:readonly" class="z-txt " disabled="disabled" /></div>
    <div class="grid_1 lbl ">审核日期</div>
    <div class="grid_3 val"><input type="text" data-bind="dateboxValue:form.ApproveDate,readOnly:readonly" class="z-txt easyui-datebox" disabled="disabled" /></div>
    <div class="clear" ></div>

    <div class="grid_1 lbl">审核说明</div>
    <div class="grid_11 val">
        <textarea data-bind="value:form.ApproveRemark,readOnly:readonly" style="width: 99%" class="z-area-txt" disabled="disabled"> </textarea></div>
    <div class="clear" ></div>

    <div class="grid_1 lbl">备注说明</div>
    <div class="grid_11 val">
        <textarea data-bind="value:form.Bdjl_Remark,readOnly:readonly" style="width: 99%" class="z-area-txt"> </textarea></div>
    <div class="clear" ></div>

</div>


